@extends('admin.layouts.wap')
@section('title', '修改小程序模版')

@section('content')

<div class="row">
    <div class="col-md-12">
        <form id="comment-form" method="POST" action="{{ URL::current() }}">
            <div class="card">
                <div class="card-header">
                    <div class="card-title">修改小程序模版</div>
                </div>
                <div class="card-body">
                    <div class="form-group col-md-3">
                        <label for="text">模版名称：</label>
                        <select class="form-control input-square" name="source_miniprogram_appid">
                            @foreach($template_lists as $template_list)
                            <option @if($template_list['source_miniprogram_appid'] == $template->source_miniprogram_appid) selected @endif value="{{ $template_list['source_miniprogram_appid'] }}">{{ empty($template_list['source_miniprogram']) ? "未命名" : $template_list['source_miniprogram'] }}</option>
                            @endforeach
                        </select>
                        @csrf
                    </div>
                    <div class="form-group col-md-12">
                        <label for="text">服务器域名：</label>
                        <input type="text" class="form-control" name="modify_domain" placeholder="请输入服务器域名,使用;隔开" value="{{ $template->modify_domain }}">
                    </div>
                    <div class="form-group col-md-12">
                        <label for="text">业务域名：</label>
                        <input type="text" class="form-control" name="webview_domain" value="{{ $template->webview_domain }}" placeholder="请输入业务域名,使用;隔开">
                    </div>
                    <div class="form-group col-md-3">
                        <label for="text">模版类型：</label>
                        <select class="form-control input-square" name="template_sort">
                            <option @if($template->template_sort == 1) selected @endif value="1">天天外链模版</option>
                            <option @if($template->template_sort == 2) selected @endif value="2">座位查询系统</option>
                        </select>
                    </div>
                    <div class="form-group col-md-3">
                        <label for="text">模版状态：</label>
                        <select class="form-control input-square" name="disable">
                            <option @if($template->disable == 1) selected @endif value="1">可用</option>
                            <option @if($template->disable == 2) selected @endif value="2">禁用</option>
                        </select>
                    </div>
                </div>
                <div class="card-action">
                    <button class="btn btn-primary" type="submit">立即更新</button>
                </div>
            </div>
        </form>
    </div>
</div>


@endsection
